cmake_minimum_required(VERSION 3.10)

project (NarcissisticNumber)

add_subdirectory(src bin)

enable_testing()

add_test(NAME test_run
	WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}"
	COMMAND NarNum t 4
	)

add_test(NAME test_2
	WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}"
	COMMAND NarNum t 2
	)
set_tests_properties(test_2
 PROPERTIES PASS_REGULAR_EXPRESSION "0 1")

add_test(NAME test_3
	WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}"
	COMMAND NarNum t 3
	)
set_tests_properties(test_3
 PROPERTIES PASS_REGULAR_EXPRESSION "0 1 2 12 22 122")

add_test(NAME test_4
	WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}"
	COMMAND NarNum t 4
	)
set_tests_properties(test_4
 PROPERTIES PASS_REGULAR_EXPRESSION "0 1 2 3 130 131 203 223 313 332 1103 3303")

add_test(NAME test_8
	WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTEST_CONFIGURATION_TYPE}"
	COMMAND NarNum t 8
	)
set_tests_properties(test_8
 PROPERTIES PASS_REGULAR_EXPRESSION "0 1 2 3 4 5 6 7 24 64 134 205 463 660 661 40663 42710 42711 60007 62047 636703 3352072 3352272 3451473 4217603 7755336 16450603 63717005 233173324 3115653067 4577203604 61777450236 147402312024")
